package com.showsu.editor.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.showsu.editor.entity.po.TblRemoteInterfaceInfo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * @Author: William
 * @Description:
 * @Date: Created in 7:48 下午 2023/11/23
 * @Modified By:
 */
@Mapper
public interface TblRemoteInterfaceInfoMapper extends BaseMapper<TblRemoteInterfaceInfo> {

    /**
     * 通过interfaceId查出相同interfaceName下有自动切换标志的接口信息
     * @param params
     * @return
     */
    List<TblRemoteInterfaceInfo> queryAutoSwitchInterfacesBySameInterface(Map<String, Object> params);

    /**
     * 根据接口归类将该归类下正在使用的接口置为不在使用状态
     * @param params
     * @return
     */
    int updateActiveToUnavailableByInterfaceName(Map<String, Object> params);

    /**
     * 更新某接口是否在用的状态
     * @param params
     * @return
     */
    int updateActiveByInterfaceId(Map<String, Object> params);
}
